package com.sc.nft.controller;

import com.sc.nft.entity.vo.FavoriteApeVO;
import com.sc.nft.entity.vo.HouseOfTibetansVO;
import com.sc.nft.service.PushRecordService;
import com.sc.nft.sup.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;


/**
 * 轮盘抽奖
 */

@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/push")
@Api(tags ="推送获取数据")
public class PushDateController {

    private final PushRecordService pushRecordService;

    @ApiOperation(value = "数藏之家获取数据", notes = "数藏之家获取数据", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_VALUE)
    @GetMapping(value = "/getHouseOfTibetansList", produces = MediaType.APPLICATION_JSON_VALUE)
    public Result<ArrayList<HouseOfTibetansVO>> getHouseOfTibetansList()  {
        return Result.success(pushRecordService.getHouseOfTibetansList());
    }

    @ApiOperation(value = "收藏猿获取数据", notes = "收藏猿获取数据", httpMethod = "POST", produces = MediaType.APPLICATION_JSON_VALUE)
    @PostMapping(value = "/getFavoriteApeList", produces = MediaType.APPLICATION_JSON_VALUE)
    public Result<ArrayList<FavoriteApeVO>> getFavoriteApeList()  {//
        return Result.success(pushRecordService.getFavoriteApeList());
    }




}
